package com.application.fabric.test;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

public class AOPtets {
    @Pointcut("execution(* com.application.fabric.users.controller.*.*(..))")
    public void log() {}

    @Before( value = "log()")
    public void doBefore(JoinPoint joinPoint) {
        // 执行前置通知操作
        System.out.println("测试AOP" + joinPoint);
    }

    @After(value = "log()")
    public void doAfter(JoinPoint joinPoint) {
        // 执行后置通知操作
    }
}
